﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterpage/Site.Master" AutoEventWireup="true" CodeBehind="usermanagement.aspx.cs" Inherits="Web.pages.usermanagement" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="upl" UpdateMode="Conditional"  runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="grvResult"/>
        </Triggers>
        <ContentTemplate>
            <div style="width: 100%; height: 100%;">
                <div>
                    <table>
                       <tr>
                            <td style="text-align: right;vertical-align: middle;">
                                <asp:Label ID="Label8" CssClass="label"  runat="server" Text="ชื่อ-สกุล"></asp:Label> :</td>
                            <td style="text-align: left;vertical-align: middle;">
                                <asp:TextBox ID="txName" MaxLength="20" CssClass="textbox" runat="server"></asp:TextBox></td>
                            <td style="text-align: right;vertical-align: middle;">
                                <asp:Label ID="Label5" CssClass="label"  runat="server" Text="อีเมลล์"></asp:Label> :</td>
                            <td style="text-align: left;vertical-align: middle;">
                                <asp:TextBox ID="txEmail" MaxLength="20" CssClass="textbox" runat="server"></asp:TextBox></td>
                        </tr>
                       <tr>
                            <td style="text-align: right;vertical-align: middle;">
                                <asp:Label ID="Label2" CssClass="label"  runat="server" Text="บริษัท"></asp:Label> :</td>
                            <td style="text-align: left;vertical-align: middle;">
                                <asp:TextBox ID="txCompany" MaxLength="20" CssClass="textbox" runat="server"></asp:TextBox></td>
                            <td style="text-align: right;vertical-align: middle;">
                                <asp:Label ID="Label1" CssClass="label"  runat="server" Text="แผนก"></asp:Label> :</td>
                            <td style="text-align: left;vertical-align: middle;">
                                <asp:TextBox ID="txDept" MaxLength="20" CssClass="textbox" runat="server"></asp:TextBox></td>
                        </tr>
                       <tr>
                            <td style="text-align: right;vertical-align: middle;">
                                <asp:Label ID="Label4" CssClass="label"  runat="server" Text="ตำแหน่ง"></asp:Label> :</td>
                            <td style="text-align: left;vertical-align: middle;">
                                <asp:TextBox ID="txPosition" MaxLength="20" CssClass="textbox" runat="server"></asp:TextBox></td>
                           <td></td><td>
                            <asp:Button ID="btSearch" runat="server" Text="ค้นหา" OnClick="btSearch_Click" />
                            <asp:Button ID="btSubmit" runat="server" Text="บันทึก" OnClick="btSubmit_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div style="width: 100%; height: 100%;">
                <asp:GridView Width="100%" CssClass="table_empty" AutoGenerateColumns="False" BorderWidth="1px"
                    AllowPaging="True" PageSize="18" AllowSorting="True" EmptyDataText="ไม่มีข้อมูล" ID="grvResult" runat="server">
                    <HeaderStyle CssClass="row_header"></HeaderStyle>
                    <RowStyle CssClass="row_style" />
                    <AlternatingRowStyle CssClass="row_alter" />
                    <Columns>
                        <asp:TemplateField HeaderText="ลำดับ"   >
                            <HeaderStyle HorizontalAlign="Center" Width="50px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="chk"/>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ลำดับ"   >
                            <HeaderStyle HorizontalAlign="Center" Width="50px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <ItemTemplate>
                                <asp:Label ID="lbNo" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ชื่อผู้ใช้">
                            <HeaderStyle HorizontalAlign="Center" Width="150px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label ID="UID" Text='<%# DataBinder.Eval(Container.DataItem, "UID") %>' runat="server" Visible="False" ></asp:Label>
                                <asp:Label ID="FNAME" Text='<%# DataBinder.Eval(Container.DataItem, "FNAME") %>' runat="server"></asp:Label> &nbsp;
                                <asp:Label ID="LNAME" Text='<%# DataBinder.Eval(Container.DataItem, "LNAME") %>' runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="EMAIL">
                            <HeaderStyle HorizontalAlign="Center" Width="100px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="EMAIL" Text='<%# DataBinder.Eval(Container.DataItem, "EMAIL") %>' runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="เบอร์โทรศัพท์">
                            <HeaderStyle HorizontalAlign="Center" Width="100px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="TEL" Text='<%# DataBinder.Eval(Container.DataItem, "TEL") %>' runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="บริษัท">
                            <HeaderStyle HorizontalAlign="Center" Width="150px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="COMPANY" Text='<%# DataBinder.Eval(Container.DataItem, "COMPANY") %>' runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="แผนกงาน">
                            <HeaderStyle HorizontalAlign="Center" Width="100px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="DEPT" Text='<%# DataBinder.Eval(Container.DataItem, "DEPT") %>' runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ตำแหน่งงาน">
                            <HeaderStyle HorizontalAlign="Center" Width="100px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="POSITION" Text='<%# DataBinder.Eval(Container.DataItem, "POSITION") %>' runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="เวลาล่าสุด">
                            <HeaderStyle HorizontalAlign="Center" Width="150px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="LASTDATE" Text='<%# DataBinder.Eval(Container.DataItem, "LASTDATE") %>' runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="สิทธิ์">
                            <HeaderStyle HorizontalAlign="Center" Width="50px" CssClass="row_header" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="Authorize" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
